<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/pub/editor/";  //应用的地址名
String addActionName = basePath+"EditorUploadAction.action";
String uploadType = request.getParameter("uploadType");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>系统更新信息表添加</title>
<script type="text/javascript">
<!--
           $(function(){
               //初始化工作，因为远程载入该界面时无法通过在标签中进行设置相应的验证属性等信息，必须要在这里进行初始化
               $('#addBtn').linkbutton();
               $('#filedata').validatebox({
                   required:'true',
                   missingMessage:'请选择上传文件！',
                   <% if("flash".equals(uploadType)){%>
                   validType:'flash'
                   <%}else if("image".equals(uploadType)){%>
                   validType:'image'
                   <%}else{%>
                   validType:'file'
                   <%}%>
               });
	           //点击添加按钮操作
			   $('#addBtn').click(function(){
                  $('#SysUpdateInfo_addItem').submit();
	            });
	            //表单验证及提交处理操作
	           $('#SysUpdateInfo_addItem').form({
			        url:'<%=addActionName%>',
			        onSubmit: function(){
			           if($(this).form('validate')){
			                 $.util.showLoading();
			                 $('#operateWindow').window('close');
                            return true;
			             }else{
			                return false;
			             }
			        },
			        success:function(data){
			            $.util.removeLoading();
                        callback('<%=path%>/common/loadFile.jsp?vcId='+data);
			        }
				});
	            
           });
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<s:form action ="SysUpdateInfo_addItem" method ="POST" enctype ="multipart/form-data"> 
<table width="100%" height="93%" class="tb_add_th">
<tr height="40"><td colspan="2">提示：选择完上传文件后请点击【完成上传】按钮</td></tr>
<tr><td><s:file name ="filedata" id="filedata" label="选择文件"/></td></tr>
<tr height="40"><td colspan="2" align="right"><a id="addBtn" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-up">完成上传</a></td></tr>
</table>
</s:form>
</body>
</html>


